-- GENERATED SPELL FOR [Storming Wind-Ripper] --


function spell0_22310(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(20295,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22310', 3000, 1)
end

function spell1_22310(pUnit, Event) --@Lightning Shield,n/a--
pUnit:FullCastSpellOnTarget(12550,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22310', 0, 1)
end

function Sorts_22310(pUnit, Event)
local choix_sorts_22310 = math.random(0, 1)
if choix_sorts_22310 == 0 then
pUnit:RegisterEvent('spell0_22310', 1, 1)
end
if choix_sorts_22310 == 1 then
pUnit:RegisterEvent('spell1_22310', 1, 1)
end
end

function mob22310_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22310', math.random(1500, 3000), 1)
end

function mob22310_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22310_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22310_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22310, 1, 'mob22310_Action')
RegisterUnitEvent(22310, 2, 'mob22310_Leave')
RegisterUnitEvent(22310, 3, 'mob22310_Kill')
RegisterUnitEvent(22310, 4, 'mob22310_Die')
